<?php
if(isset($query))
    $fila = $query->row();
?>
<!-- cuerpo -->
<div id="yui-main">
    <div class="yui-b">
        <div class="yui-g">
            <div class="ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
                <h1>Datos Personales</h1>
            </div>
            <div id="gbox_editgrid" class="ui-jqgrid ui-widget ui-widget-content ui-corner-all" dir="ltr" style="padding:5px;">
                <form action="<?=base_url()?>index.php/users/modificar" method="post">
                    <table border="0">
                        <tbody>
                            <tr>
                                <td><label><?=lang('nombre_usuarios');?></label></td>
                                <?php if(isset($query)):?>
                                <td><input type="text" name="create_username" <?php if(isset($query)) echo 'value="'.$fila->username.'"';?> size="50" readonly="readonly" /></td>
                                <?php else:?>
                                <td><input type="text" name="create_username" <?php if(isset($query)) echo 'value="'.$fila->username.'"';?> size="50"  /></td>
                                <?php endif;?>
                            </tr>
                            <tr>
                                <td><label><?=lang('clave_usuarios');?></label></td>
                                <td><input type="password" name="create_password" size="50" /></td>
                            </tr>
                            <tr>
                                <td><label><?=lang('mail_usuarios');?></label></td>
                                <td><input type="text" name="mail" size="50" <?php if(isset($query)) echo 'value="'.$fila->email.'"';?> /></td>
                            </tr>
                            <tr>
                                <td><label><?=lang('direccion_usuarios');?></label></td>
                                <td><input type="text" name="address_1" size="50" <?php if(isset($query)) echo 'value="'.$fila->address_1.'"';?> /></td>
                            </tr>
                            <tr>
                                <td><label><?=lang('telefono_usuarios');?></label></td>
                                <td><input type="text" name="phone_1" size="50" <?php if(isset($query)) echo 'value="'.$fila->phone_1.'"';?> /></td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <input type="hidden" name="id" value="<?if(isset($query)) echo $fila->id;?>" />
                                    <input type="submit" name="Enviar" value="<?=lang('guardar_usuarios');?>">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>